const love1 = "秋葵";
const love2 = "香菜";

const text = myTag`邓哥喜欢${love1}邓哥也喜欢${love2}`;

function myTag(parts) {
  const values = Array.prototype.slice.apply(arguments).slice(1);
  let str = "";
  for (let i = 0; i < values.length; i++) {
    str += parts[i] + values[i];
  }

  str += parts[parts.length - 1];
  return str;
}

console.log(text);

// es6内部自己实现的模板标记
var test = String.raw`abc\\nbcd`;
console.log(test);
